/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package etherblocks.mods.shooter.entitysystem.systems;

import etherblocks.game.entitysystem.*;
import etherblocks.game.entitysystem.components.*;
import etherblocks.mods.shooter.entitysystem.components.*;
import etherblocks.mods.shooter.gui.ScreenController_IngameMenu;

/**
 *
 * @author Carl
 */
public class ZombieCounterSystem implements EntitySystem{

    public ZombieCounterSystem(ScreenController_IngameMenu screenController_IngameMenu){
        this.screenController_IngameMenu = screenController_IngameMenu;
    }
    private ScreenController_IngameMenu screenController_IngameMenu;
    private int zombieCounter;
    
    @Override
    public void onNextFrameCalculation(EntityMap entityMap, float lastTimePerFrame){
        for(Entity entity : entityMap.getEntities(ShootableComponent.class, RemovedComponent.class)){
            zombieCounter++;
            screenController_IngameMenu.setZombieCounter(zombieCounter);
        }
    }
}
